import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
/**
 *  id: '1', 
    name: '巧克力', 
    price: 5, 
    stock: 10, 
    image: 'https://images.unsplash.com/photo-1511381939415-e44015466834?w=400',
    description: '黑巧克力'
 */
@Entity()
export class Snack {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  userId: number;

  @Column()
  name: string;

  @Column()
  price: number;

  @Column()
  stock: number;

  @Column()
  image: string;

  @Column()
  description: string;
}
